From a1d469753528a98aec971377a526619da5054b20 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 22 Mar 2021 07:52:34 +0100
Subject: [PATCH] gcc.specs: drop -Werror

Build with -Werror raises the following build failure with gcc 10:

/home/buildroot/autobuild/run/instance-1/output-1/host/bin/aarch64-none-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2   -I/home/buildroot/autobuild/run/instance-1/output-1/build/efivar-37/src/include/   -specs=/home/buildroot/autobuild/run/instance-1/output-1/build/efivar-37/gcc.specs  -L.  -fPIC -Wl,-z,muldefs     -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o efivar efivar.c -lefivar -ldl
In file included from efivar.h:28,
                 from efivar.c:40:
In function 'text_to_guid',
    inlined from 'parse_name.constprop' at efivar.c:157:8:
guid.h:106:2: error: 'strncpy' output may be truncated copying 8 bytes from a string of length 38 [-Werror=stringop-truncation]
  106 |  strncpy(eightbytes, text, 8);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes:
 - http://autobuild.buildroot.org/results/fcba72d359f4128515560e9105384cd4deff5043

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: not upstreamable as Makefiles were reworked and a new
ERRORS parameter was added:
https://github.com/rhboot/efivar/commit/998f617cec92d526e1fadb745673ceef63fa1483]
[Erico: rebase to 38]
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
 src/include/defaults.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/defaults.mk b/src/include/defaults.mk
index 632b155..2a9537a 100644
--- a/src/include/defaults.mk
+++ b/src/include/defaults.mk
@@ -29,7 +29,7 @@ WARNINGS_GCC ?=
 WARNINGS_CCC_ANALYZER ?= $(WARNINGS_GCC)
 WARNINGS ?= -Wall -Wextra $(call family,WARNINGS)
 ERRORS_GCC ?=
-ERRORS ?= -Werror $(call family,ERRORS)
+ERRORS ?= $(call family,ERRORS)
 CPPFLAGS ?=
 override _CPPFLAGS := $(CPPFLAGS)
 override CPPFLAGS = $(_CPPFLAGS) -DLIBEFIVAR_VERSION=$(VERSION) \
-- 
2.37.3

